import { AnimationClip } from "../../thirdparty/three/imports";

export class AnimationClip3D
{
    _animationClip: AnimationClip;

    get name()
    {
        return this._animationClip.name;
    }

    static get(action: AnimationClip)
    {
        let result = this._cache.get(action);

        if (!result)
        {
            result = new AnimationClip3D();
            result._animationClip = action;
            this._cache.set(action, result);
        }

        return result;
    }

    private static _cache = new Map<AnimationClip, AnimationClip3D>();
}
